<?php !defined("IN_SYSTEM") && exit("ACCESS DENY");?>
{template theme}
{template header}
{template top}
<div class="wrap">
	
	<div class="wmenu"><ul><li><a href="{BASE_URL}">首页</a> &gt; </li>{if $destid}<li><a href="{url list.php?dest=$destid}">{$dest[$destid]}</a> &gt;</li>{/if} {if $regionid}<li><a href="{url list.php?region=$regionid}">{$region[$destid][$regionid]}</a> &gt; </li>{/if} {if $type}<li><a href="{url list.php?$url&type=$type}">{$cates[$type]['catename']}</a> &gt; </li>{/if}<li>餐厅列表</li></ul></div>
	<div style="width:700px;float:left;background:#FDFDFD;border:1px solid #F2F2F2;padding-bottom:10px;" class="left">
	<div class="searchinfo">
	<form name="shopsearch" method="GET" action="{url list.php}">
		<input type="hidden" value="{$qprice}" name="qprice" id="qprice"/>
		<input type="hidden" value="{$cprice}" name="cprice" id="cprice"/>
	    <ul><li class="sarea">
		<b>按地理位置</b>：
            {php $locations=get_location();}
            <select onchange="getregion(this,'region')" id="dest" name="dest">
			{loop $locations $lid $location}
			<option value="{$lid}">{$location['name']}</option>
			{/loop}
			</select>
           
            <select id="region" name="region" onchange="document.shopsearch.submit();" >
            <option value="0">请选择地区</option>
            {if !$destid}
            {php $destid=5;}
            {/if}
			{loop $locations[$destid]['sub'] $did $subloca}
     		<option value="{$did}" {if $regionid==$did}selected{/if}>{$subloca}</option>
    		{/loop}
			</select>
            </li>
        <li>
        <b>按起送金额</b>：<a href="javascript:;" {if !$qprice}class="acurrent"{/if} onclick="seachprice('qprice',0)">不限</a>
        <a href="javascript:;" {if $qprice==1}class="acurrent"{/if} onclick="seachprice('qprice',1)">10元以下</a><a href="javascript:;" {if $qprice==2}class="acurrent"{/if} onclick="seachprice('qprice',2)">10元-29元</a><a href="javascript:;" {if $qprice==3}class="acurrent"{/if} onclick="seachprice('qprice',3)">30元-49元</a><a href="javascript:;" {if $qprice==4}class="acurrent"{/if} onclick="seachprice('qprice',4)">50元-100元</a><a href="javascript:;" {if $qprice==5}class="acurrent"{/if} onclick="seachprice('qprice',5)">100元以上</a>
        </li>
         <li>
        <b>按外送费用</b>：<a href="javascript:;" {if !$cprice}class="acurrent"{/if} onclick="seachprice('cprice',0)">不限</a>
        <a href="javascript:;" {if $cprice==1}class="acurrent"{/if} onclick="seachprice('cprice',1)">0元</a><a href="javascript:;" {if $cprice==2}class="acurrent"{/if} onclick="seachprice('cprice',2)">1元-2元</a><a href="javascript:;" {if $cprice==3}class="acurrent"{/if} onclick="seachprice('cprice',3)">3元-5元</a><a href="javascript:;" {if $cprice==4}class="acurrent"{/if} onclick="seachprice('cprice',4)">6元-10元</a><a href="javascript:;" {if $cprice==5}class="acurrent"{/if} onclick="seachprice('cprice',5)">10元以上</a>
        </li>
	</ul>
	<script type="text/javascript">
	function seachprice(name,id){
		if($('#'+name).val()==id)return false;
		$('#'+name).val(id);
		document.shopsearch.submit();
	}
	</script>
	</form>
		<h2 style="font-size:13px;border-bottom:1px solid #DDDDDD;margin-top:15px;">{if $regionid}{$region[$destid][$regionid]}附近{/if}{if $regionid==0}{$dest[$destid]}{/if}共有 {$num} 家{$cates[$type]['catename']}餐厅{if $keyword}符合你的搜索条件{/if}</h2>
	</div>
	<div class="searchresult">
	{loop $results $result}
	<div class="sshop">
		<div class="simg"><a href="{url store.php?id=$result[shopid]}" target="_blank" title="{$result['shopname']}"><img width="120" height="100" src="{if $result['logo']}{DATA_DIR}{$result['logo']}{else}{THEME_ROOT}images/noshop.jpg{/if}" alt="{$result['shopname']}"></a></div>
		<div class="ssum">
			<h2><a href="{url store.php?id=$result[shopid]}" title="{$result['shopname']}" target="_blank">{$result['shopname']}</a></h2>
			<ul class="ssumul">
			<li>{$cates[$result['cid']]['catename']}</li>
			<li title="{$result['minnum']}份起送{if $result['minprice']>0} 起送价{$result['minprice']}元{/if}{if $result['extprice']>0} 外送费{$result['extprice']}元{/if}">外送条件：<font class="red">{$result['minnum']}</font>份起送<span>{if $result['minprice']>0}, 起送价<font class="red">{$result['minprice']}</font>元{/if}{if $result['extprice']>0}, 外送费<font class="red">{$result['extprice']}</font>元{/if}</span></li>
			
			<li><span>&nbsp;</span></li>
			<li><span>{if $result['shopclose']}已打烊，次日 {$worktime1[$result['opentime']]} 开始订餐{else}营业中{/if}</span></li>
			</ul>
		</div>	
	</div>
	{/loop}
	
	</div>
	<div style="float:right;margin-right:15px;">{$pager}</div>
	</div>
	<div style="float:right;border:1px solid #DADADA;width:276px" class="right">
	{if !empty($historys)}
	<div class="rtitle">浏览历史</div>
	<ul class="history">
	{loop $historys $history}
	<li><a href="{url store.php?id=$history[shopid]}" target="_blank">{$history['shopname']}</a></li>
	{/loop}
	</ul>
	{/if}
	<div class="rtitle">订餐播报</div>
	<div>
	{php $hotorder = get_index_hot_order();}
	<ul class="neworder" id="neworder" style="height:327px;overflow:hidden;">
			{loop $hotorder['orders'] $horder}
				<li>[{echo substr_replace($horder['phone'],'***',3,6)}]在<a target="_blank" href="{url store.php?id=$horder[shopid]}"><font color="#F2662A">{$horder['shopname']}</font></a>叫了
				{php $num = count($hotorder['product'][$horder['txnid']]);$i=0;}
				{loop $hotorder['product'][$horder['txnid']] $product}
				{$product['title']}
				{if ++$i!=$num}，{/if}
				{/loop}等,获得了<font color="red">{php echo intval($horder['gross']);}</font>个积分</li>
			{/loop}
	</ul>
	<script type="text/javascript">new simplescroll('neworder', {start_delay:0, speed: 40, delay:2000, direction:1, scrollItemCount:1, movecount:1});</script>		
	</div>		
	</div>
	
</div>



<?php include template('footer')?>